#include "img_struct.h"

statistics_config_t mn34041pl_tile_config = {
	1,
	1,

	24,
	16,
	128,
	48,
	160,
	250,
	160,
	250,
	0,
	16383,

	12,
	8,
	0,
	8,
	340,
	512,

	8,
	5,
	256,
	10,
	448,
	816,
	448,
	816,

	0,
	16383,
};
 line_t mn34041pl_50hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY100, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY50, ISO_100, 0}}, {{SHUTTER_1BY50, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_12800,0}}
		}
};

 line_t mn34041pl_60hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY120, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY60, ISO_100, 0}}, {{SHUTTER_1BY60, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_12800,0}}
		}
};

img_awb_param_t mn34041pl_awb_param = {
	{
		{2170, 1024, 1660},	//AUTOMATIC
		{1280, 1024, 2825},	//INCANDESCENT
		{1520, 1024, 2425},	//D4000
		{1860, 1024, 1850},	//D5000
		{2170, 1024, 1660},	//SUNNY //{1875, 1024, 1400}
		{2380, 1024, 1580},	//CLOUDY
		{1024, 1024, 1024},	//FLASH
		{1024, 1024, 1024},	//FLUORESCENT
		{1024, 1024, 1024},	//FLUORESCENT_H
		{1024, 1024, 1024},	//UNDER WATER
		{1875, 1024, 1400},	//CUSTOM
		{1700, 1024, 1600},	//AUTOMATIC OUTDOOR
	},
	{
		12,
		{{ 1000,1700,2400,3250,-2000,4700,-1900,5800,1000,900,1300,1800,1},		// 0	INCANDESCENT
		 {  1150,2050,1800,2950,-1700,4400,-1900,6600,1000,300,1000,1200,2},		// 1    D4000
		 {  1350,2250,1500,2500,-1300,3800,-1300,4800,1000,-300,1000,400,4},		// 2	D5000
		 {  1700,2500,1250,2100,-800,2950,-800,3750,1000,-750,1000,-200,8},	// 3    SUNNY
		 {  1850,2650,1250,2000,-600,2550,-600,3300,1000,-1200,1000,-500,4},	// 4    CLOUDY
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 5    PROJECTOR
		 {  2000,2400,1800,3550,-900,3800,-1500,6400,1000,-500,3500,-4800,-1},	// 6 GREEN REGION
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 7	FLASH
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 8	FLUORESCENT
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 9    FLUORESCENT_H
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	//UNDER WATER
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 }}//CUSTOM
	},
	{	{ 0 ,6},	//LUT num. AUTOMATIC  INDOOR
		{ 0, 1},	//LUT num. INCANDESCENT
		{ 1, 1},	//LUT num. D4000
		{ 2, 1},	//LUT num. D5000
		{ 2, 5},	//LUT num. SUNNY
		{ 4, 3},	//LUT num. CLOUDY
		{ 7, 1},	//LUT num. FLASH
		{ 8, 1},	//LUT num. FLUORESCENT
		{ 9, 1},	//LUT num. FLUORESCENT_H
		{11, 1},	//LUT num. UNDER WATER
		{11, 1},	//LUT num. CUSTOM
		{ 0, 7},	//LUT num. AUTOMATIC  OUTDOOR
	 }
};

//change to 897 to support sensor 42db AGC  
u32 mn34041pl_ae_agc_dgain[AGC_DGAIN_TABLE_LENGTH]=
{
	953,
	947,953,949,954,949,955,950,956,951,956,950,952,947,955,950,954,
	946,952,947,952,949,958,952,954,947,954,950,956,950,955,948,954,
	950,955,951,953,949,953,947,958,953,958,947,952,950,957,950,955,
	952,956,949,957,949,952,950,954,948,955,949,955,949,953,949,956,
	950,956,950,956,951,957,952,957,949,956,952,957,952,954,949,955,
	953,959,955,954,950,956,954,959,956,955,948,956,954,951,951,950,//961
	953,959,952,960,950,955,952,958,952,956,950,956,953,958,954,956,
	949,955,950,960,955,961,952,959,956,962,957,962,956,961,989,994,
	986,987,983,989,986,988,984,989,983,992,986,988,982,988,983,990,
	985,990,984,989,987,990,985,990,985,992,987,992,984,990,986,994,
	986,992,985,991,986,994,982,988,987,992,985,988,984,989,982,991,
	990,991,984,990,988,994,991,996,986,995,988,993,987,993,988,993,
	988,993,985,992,989,994,989,991,987,992,987,991,985,991,989,994,
	993,992,985,991,987,999,991,991,987,992,992,997,993,997,990,995,
	991,997,992,994,991,997,991,996,989,993,991,996,988,994,988,994,
	989,994,989,995,991,996,994,994,988,993,994,999,994,994,1028,1037,
	1029,1034,1028,1033,1029,1035,1029,1037,1030,1031,1028,1034,1028,1031,1025,1031,
	1028,1034,1030,1032,1027,1032,1027,1035,1027,1032,1025,1034,1029,1032,1027,1034,
	1028,1034,1030,1034,1029,1033,1028,1034,1031,1032,1025,1031,1027,1036,1027,1033,
	1027,1033,1030,1034,1028,1033,1027,1033,1031,1036,1030,1036,1030,1035,1030,1035,
	1030,1032,1026,1035,1030,1036,1027,1032,1026,1032,1033,1038,1027,1033,1027,1039,
	1034,1039,1031,1031,1030,1036,1031,1037,1030,1035,1028,1034,1032,1034,1028,1034,
	1029,1035,1031,1036,1031,1037,1030,1035,1030,1037,1032,1035,1029,1035,1028,1036,
	1025,1031,1027,1033,1032,1033,1028,1034,1027,1036,1031,1036,1030,1036,1019,1024,
	1012,1018,1008,1014,1012,1021,1014,1023,1011,1016,1010,1015,1016,1021,1014,1015,
	1010,1018,1013,1018,1013,1016,1011,1016,1011,1016,1013,1014,1009,1014,1009,1020,
	1012,1018,1008,1017,1015,1020,1013,1017,1010,1015,1009,1017,1011,1016,1009,1014,
	1012,1018,1011,1017,1011,1013,1012,1019,1014,1019,1014,1018,1011,1016,1012,1018,
	1007,1015,1010,1014,1007,1013,1008,1014,1009,1017,1007,1015,1011,1016,1012,1018,
	1013,1018,1008,1013,1011,1017,1011,1013,1009,1015,1008,1017,1015,1014,1008,1013,
	1015,1020,1014,1020,1009,1017,1011,1019,1013,1018,1010,1014,1009,1015,1013,1018,
	1013,1015,1010,1020,1015,1021,1016,1016,1013,1018,1016,1021,1012,1019,1015,1020,
	1009,1014,1008,1013,1012,1017,1012,1018,1013,1018,1012,1017,1012,1020,1015,1015,
	1013,1018,1012,1018,1009,1017,1011,1019,1013,1015,1011,1016,1012,1019,1016,1020,
	1012,1018,1011,1019,1014,1020,1013,1016,1012,1018,1013,1022,1012,1018,1010,1016,
	1018,1024,1017,1017,1010,1018,1018,1024,1018,1020,1015,1020,1014,1021,1013,1018,
	1012,1018,1011,1018,1015,1021,1012,1018,1015,1022,1016,1021,1016,1022,1016,1021,
	1019,1019,1016,1021,1016,1022,1012,1017,1013,1021,1017,1023,1014,1019,1012,1024,
	1020,1025,1015,1020,1016,1025,1018,1023,1015,1020,1016,1021,1018,1021,1016,1022,
	1019,1025,1017,1023,1018,1024,1020,1026,1017,1021,1017,1023,1020,1025,1022,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,	
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,	
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	};

u32 mn34041pl_ae_sht_dgain[SHUTTER_DGAIN_TABLE_LENGTH] =
{
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1024,1018,1023,1017,1023,1017,1022,1016,1022,1016,1010,1016,1010,1017,1012,1018,
	1013,1007,1016,1008,1024,1018,1025,1018,1012,1020,1014,1021,1015,1009,1017,1011,
	1019,1013,1007,1016,1010,1007,1014,1016,1025,1019,1012,1021,1015,1009,1018,1012,
	1006,1015,1009,1018,1012,1006,1016,1011,1005,1016,1010,1013,1023,1017,1011,1021,
	1015,1010,1020,1014,1007,1018,1012,1006,1000,1011,1006,1000,1012,1007,1011,1022,
	1016,1010,1004,1016,1010,1004,1016,1009,1004,1016,1010,1004,998,1011,1006,1000,
	995,1009,1012,1006,1019,1013,1007,1001,1015,1009,1002,996,1011,1006,999,994,
	1009,1004,999,994,1011,1007,1004,998,1014,1008,1001,995,1011,1005,1000,994,
	1012,1007,1002,996,992,1010,1005,1000,996,1015,1008,1002,996,990,1009,1003,
	997,991,986,1005,1000,995,990,985,1005,1000,995,991,986,1009,1003,997,
	991,985,1006,1000,995,989,983,1006,1000,994,989,983,1007,1002,997,992,
	988,986,1009,1003,997,991,985,979,1003,997,991,986,981,976,1001,996,
	991,986,982,977,1006,1001,995,989,983,976,1004,998,992,987,980,975,
	970,999,994,989,985,979,975,970,1003,998,992,986,980,974,968,999,
	993,987,981,975,970,965,997,991,986,981,975,970,973,968,1002,997,
	991,985,979,973,968,963,998,992,987,981,976,970,966,960,997,1003,
	998,992,986,981,975,970,964,1004,999,993,988,981,976,970,965,960,
	1002,996,990,984,980,974,969,965,960,955,999,994,989,983,978,973,
	968,963,957,952,999,994,988,968,963,958,953,948,942,937,932,981,
	976,971,965,960,955,950,945,939,933,929,934,985,981,975,970,965,
	960,954,949,944,939,934,929,984,979,974,969,964,959,954,947,942,
	938,932,927,922,980,974,969,964,958,953,948,942,937,932,927,922,
	916,911,969,964,959,954,949,944,939,934,929,924,919,914,909,904,
	899,894,961,956,951,946,952,946,941,936,931,926,921,916,911,906,
	901,896,891,964,959,954,949,944,
	951,948,931,940,932,920,929,917,911,917,902,899,905,887,888,893,
	872,876,985,965,972,970,953,961,954,942,951,939,932,941,923,921,
	928,908,910,915,894,899,900,882,888,885,870,876,990,979,989,977,
	971,979,963,960,968,948,952,957,936,941,943,924,933,929,914,923,
	915,905,913,901,895,904,888,886,893,874,876,1023,1001,1008,1010,
	990,999,996,980,989,982,971,980,967,961,971,953,952,959,940,942,
	947,927,932,934,916,923,920,905,913,905,895,904,892,887,894,878,
	876,1054,1031,1036,1041,1019,1026,1028,1008,1017,1013,999,1008,1000,989,1000,
	985,980,989,971,971,978,958,962,967,947,953,953,935,944,939,924,
	934,924,916,925,910,907,915,897,897,903,883,888,890,872,878,876,
	1066,1077,1068,1057,1070,1056,1051,1061,1042,1042,1052,1030,1035,1040,1018,1027,
	1028,1009,1019,1013,1000,1011,1000,994,1003,988,984,994,974,977,983,
	962,968,971,952,961,957,942,952,944,935,945,930,926,935,917,918,
	925,905,911,914,895,902,900,884,893,888,876,885,875,868,876,1126,
	1120,1127,1101,1100,1103,1076,1080,1079,1054,1060,1054,1033,1040,1028,1013,1020,
	1001,993,999,976,972,976,952,952,953,928,931,928,906,911,902,885,891,876,
};
u8 mn34041pl_dlight[2] = {128,4};

